home *** CD-ROM | disk | FTP | other *** search
/ Network CD 2 / Network CD - Volume 2.iso / programs / internet / tcp / amitcp / amitcp-api-22.lha / AmiTCP-2.2 / src / netlib / errlst.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-08-12  |  6.5 KB  |  156 lines

  1. /*
  2.  * errlst.c -- network errno support for AmiTCP/IP
  3.  *             defines __sys_errlist[] and __sys_nerr 
  4.  *          or defines sys_errlist[] and sys_nerr 
  5.  *
  6.  * This replaces SAS/C sys_errlist with BSD sys_errlist
  7.  *
  8.  * Author: ppessi <Pekka.Pessi@hut.fi>
  9.  *
  10.  * Copyright © 1993 AmiTCP/IP Group, <amitcp-group@hut.fi>
  11.  *                  Helsinki University of Technology, Finland.
  12.  *                  All rights reserved.
  13.  *
  14.  * Created      : Sat Mar 20 02:04:29 1993 ppessi
  15.  * Last modified: Fri Jun  4 02:18:04 1993 ppessi
  16.  *
  17.  */
  18.  
  19. #include <errno.h>
  20.  
  21. const char * const __sys_errlist[] = {
  22.     "Undefined error: 0",            /*  0 - ENOERROR */
  23.     "Operation not permitted",        /*  1 - EPERM */
  24.     "No such file or directory",        /*  2 - ENOENT */
  25.     "No such process",            /*  3 - ESRCH */
  26.     "Interrupted system call",        /*  4 - EINTR */
  27.     "Input/output error",            /*  5 - EIO */
  28.     "Device not configured",        /*  6 - ENXIO */
  29.     "Argument list too long",        /*  7 - E2BIG */
  30.     "Exec format error",            /*  8 - ENOEXEC */
  31.     "Bad file descriptor",            /*  9 - EBADF */
  32.     "No child processes",            /* 10 - ECHILD */
  33.     "Resource deadlock avoided",        /* 11 - EDEADLK */
  34.     "Cannot allocate memory",        /* 12 - ENOMEM */
  35.     "Permission denied",            /* 13 - EACCES */
  36.     "Bad address",                /* 14 - EFAULT */
  37.     "Block device required",        /* 15 - ENOTBLK */
  38.     "Device busy",                /* 16 - EBUSY */
  39.     "File exists",                /* 17 - EEXIST */
  40.     "Cross-device link",            /* 18 - EXDEV */
  41.     "Operation not supported by device",    /* 19 - ENODEV */
  42.     "Not a directory",            /* 20 - ENOTDIR */
  43.     "Is a directory",            /* 21 - EISDIR */
  44.     "Invalid argument",            /* 22 - EINVAL */
  45.     "Too many open files in system",    /* 23 - ENFILE */
  46.     "Too many open files",            /* 24 - EMFILE */
  47.     "Inappropriate ioctl for device",    /* 25 - ENOTTY */
  48.     "Text file busy",            /* 26 - ETXTBSY */
  49.     "File too large",            /* 27 - EFBIG */
  50.     "No space left on device",        /* 28 - ENOSPC */
  51.     "Illegal seek",                /* 29 - ESPIPE */
  52.     "Read-only file system",        /* 30 - EROFS */
  53.     "Too many links",            /* 31 - EMLINK */
  54.     "Broken pipe",                /* 32 - EPIPE */
  55.  
  56. /* math software */
  57.     "Numerical argument out of domain",    /* 33 - EDOM */
  58.     "Result too large",            /* 34 - ERANGE */
  59. /* non-blocking and interrupt i/o */
  60.     "Resource temporarily unavailable",    /* 35 - EAGAIN */
  61.                         /* 35 - EWOULDBLOCK */
  62.     "Operation now in progress",        /* 36 - EINPROGRESS */
  63.     "Operation already in progress",    /* 37 - EALREADY */
  64.  
  65. /* ipc/network software -- argument errors */
  66.     "Socket operation on non-socket",    /* 38 - ENOTSOCK */
  67.     "Destination address required",        /* 39 - EDESTADDRREQ */
  68.     "Message too long",            /* 40 - EMSGSIZE */
  69.     "Protocol wrong type for socket",    /* 41 - EPROTOTYPE */
  70.     "Protocol not available",        /* 42 - ENOPROTOOPT */
  71.     "Protocol not supported",        /* 43 - EPROTONOSUPPORT */
  72.     "Socket type not supported",        /* 44 - ESOCKTNOSUPPORT */
  73.     "Operation not supported",        /* 45 - EOPNOTSUPP */
  74.     "Protocol family not supported",    /* 46 - EPFNOSUPPORT */
  75.                         /* 47 - EAFNOSUPPORT */
  76.     "Address family not supported by protocol family",
  77.     "Address already in use",        /* 48 - EADDRINUSE */
  78.     "Can't assign requested address",    /* 49 - EADDRNOTAVAIL */
  79.  
  80. /* ipc/network software -- operational errors */
  81.     "Network is down",            /* 50 - ENETDOWN */
  82.     "Network is unreachable",        /* 51 - ENETUNREACH */
  83.     "Network dropped connection on reset",    /* 52 - ENETRESET */
  84.     "Software caused connection abort",    /* 53 - ECONNABORTED */
  85.     "Connection reset by peer",        /* 54 - ECONNRESET */
  86.     "No buffer space available",        /* 55 - ENOBUFS */
  87.     "Socket is already connected",        /* 56 - EISCONN */
  88.     "Socket is not connected",        /* 57 - ENOTCONN */
  89.     "Can't send after socket shutdown",    /* 58 - ESHUTDOWN */
  90.     "Too many references: can't splice",    /* 59 - ETOOMANYREFS */
  91.     "Connection timed out",            /* 60 - ETIMEDOUT */
  92.     "Connection refused",            /* 61 - ECONNREFUSED */
  93.  
  94.     "Too many levels of symbolic links",    /* 62 - ELOOP */
  95.     "File name too long",            /* 63 - ENAMETOOLONG */
  96.  
  97. /* should be rearranged */
  98.     "Host is down",                /* 64 - EHOSTDOWN */
  99.     "No route to host",            /* 65 - EHOSTUNREACH */
  100.     "Directory not empty",            /* 66 - ENOTEMPTY */
  101.  
  102. /* quotas & mush */
  103.     "Too many processes",            /* 67 - EPROCLIM */
  104.     "Too many users",            /* 68 - EUSERS */
  105.     "Disc quota exceeded",            /* 69 - EDQUOT */
  106.  
  107. /* Network File System */
  108.     "Stale NFS file handle",        /* 70 - ESTALE */
  109.     "Too many levels of remote in path",    /* 71 - EREMOTE */
  110.     "RPC struct is bad",            /* 72 - EBADRPC */
  111.     "RPC version wrong",            /* 73 - ERPCMISMATCH */
  112.     "RPC prog. not avail",            /* 74 - EPROGUNAVAIL */
  113.     "Program version wrong",        /* 75 - EPROGMISMATCH */
  114.     "Bad procedure for program",        /* 76 - EPROCUNAVAIL */
  115.  
  116.     "No locks available",            /* 77 - ENOLCK */
  117.     "Function not implemented",        /* 78 - ENOSYS */
  118.     "Inappropriate file type or format",    /* 79 - EFTYPE */
  119. };
  120.  
  121. const int __sys_nerr = { sizeof __sys_errlist/sizeof __sys_errlist[0] };
  122.  
  123.  
  124. /*
  125.  * Copyright (c) 1982, 1985 Regents of the University of California.
  126.  * All rights reserved.
  127.  *
  128.  * Redistribution and use in source and binary forms, with or without
  129.  * modification, are permitted provided that the following conditions
  130.  * are met:
  131.  * 1. Redistributions of source code must retain the above copyright
  132.  *    notice, this list of conditions and the following disclaimer.
  133.  * 2. Redistributions in binary form must reproduce the above copyright
  134.  *    notice, this list of conditions and the following disclaimer in the
  135.  *    documentation and/or other materials provided with the distribution.
  136.  * 3. All advertising materials mentioning features or use of this software
  137.  *    must display the following acknowledgement:
  138.  *    This product includes software developed by the University of
  139.  *    California, Berkeley and its contributors.
  140.  * 4. Neither the name of the University nor the names of its contributors
  141.  *    may be used to endorse or promote products derived from this software
  142.  *    without specific prior written permission.
  143.  *
  144.  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  145.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  146.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  147.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  148.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  149.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  150.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  151.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  152.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  153.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  154.  * SUCH DAMAGE.
  155.  */
  156.